import java.sql.Time;import java.util.Date;import java.util.Timer;import java.util.TimerTask;/** * Created by Administrator on 2018-12-3. * 定时器 */public class TraditionalTimerTest {    public static void main(String[] args) {        new Timer().schedule(new TimerTask() {            @Override            public void run() {                System.out.println("start...");            }        },10000,3000); //第一次10秒时执行，随后每3秒执行一次        while (true){            System.out.println(new Date());            try {                Thread.sleep(1000);            } catch (InterruptedException e) {                e.printStackTrace();            }        }    }}